/**
 * login reducer
 * @Author bian
 * @CreateDate 2016.12.9
 */

import { combineReducers } from 'redux'
import { LOGIN } from "../../actions/admin/admin_login_actions"

const initialState = {
    isPwdRight : 0,
    isAccountRight : 0
}

function loginPanel(state = initialState, action) {
    switch (action.type) {
        case LOGIN:
            return Object.assign({}, state, {
                isAccountRight : action.isAccountRight,
                isPwdRight : action.isPwdRight
            })
        default:
            return state
    }
}

const loginApp = combineReducers({
    loginPanel
})

export default loginApp